﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace House_Control
{
    class FireAlarm : Alarm
    {
        //We need this variable for when we call the base class constructor.
        static int alarmType = Alarm.FIRE;

        public FireAlarm(int roomNo) : base(alarmType, roomNo)
        {

        }
        private double temp = 70.2;
        public void setTemp(int newTemp)
        {
            temp = newTemp;
        }
        public double getTemp()
        {
            return temp;
        }
        public void trip()
        {
            tripped = true;
            log.append("Fire detected in room number " + base.getRoomNo() + "!");
            callFireDepartment();
            callOwner();
        }
    }
}
